package com.laoguo.config;

public class CustomerContextHolder {

    public static final String DATA_SOURCE_MASTER = "masterDataSource";
    public static final String DATA_SOURCE_SLAVE = "slaveDataSource";
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
    public static void setCustomerType(String customerType) {
        contextHolder.set(customerType);
    }
    public static String getCustomerType() {
        return contextHolder.get();
    }
    public static void clearCustomerType() {
        contextHolder.remove();
    }
}
